package com.designpattern.fourthchapter.absfactory;


public class NYPizzaStore extends PizzaStore{

	@Override
	public Pizza createPizza(String type) {
		Pizza pizza = null;
		PizzaIngredientFactory ingredientFactory = new NYPizzaIngredientFactory();
		if (type.equals("cheese")) {
			pizza = new CheesePizza(ingredientFactory);
			pizza.setName("NY cheese");
		} else if(type.equals("clam")){
			pizza = new CalmPizza(ingredientFactory) ;
		}

		return pizza;
	}

}
